package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Customer;
import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

//定义操作Customer表的方法
public interface CustomerMapper {

    //增加的方法
    void save(Customer customer);


    void update(Customer customer);

    //根据id查询部门
    Customer get(Long id);

    //查询所有的部门
    List<Customer> listAll();
    //查询总条数
    int selectForCount(QueryObject qo);

    //查询结果集
    List<Customer> selectForList(QueryObject qo);

    List<Employee> selectByRoleSn(String[] sns);

    void updateStatus(@Param("customerId") Long customerId, @Param("status") Integer status);

    void updateSellerId(@Param("newSellerId") Long newSellerId, @Param("customerId") Long customerId);
}
